package com.listproject.di


import com.listproject.data.SomeApiOne
import com.listproject.data.SomeApiTwo
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Singleton

/**
 * @author Android Devs Academy (Ahmed Guedmioui)
 */
@Module
@InstallIn(SingletonComponent::class)
object AppModule {

    @Provides
    @Singleton
    fun provideApi(): SomeApiOne {
        return Retrofit.Builder()
            .baseUrl("https://someapi.com")
            .build()
            .create(SomeApiOne::class.java)
    }

    @Provides
    @Singleton
    fun provideApi2(): SomeApiTwo {
        return Retrofit.Builder()
            .baseUrl("https://test.com")
            .build()
            .create(SomeApiTwo::class.java)
    }

}











